#LINUX64 toolchain set(LINUX64 True) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_SYSTEM_PROCESSOR amd64) # Cross-compiler set(CMAKE_C_COMPILER x86_64-linux-gnu-gcc) set(CMAKE_CXX_COMPILER x86_64-linux-gnu-g++) set(CMAKE_LINKER x86_64-linux-gnu-ld) set(CMAKE_OBJCOPY x86_64-linux-gnu-objcopy) set(CMAKE_FIND_ROOT_PATH /usr/x86_64-linux-gnu) list(APPEND CMAKE_FIND_ROOT_PATH /usr/x86_64-linux-gnu/lib /usr/x86_64-linux-gnu/usr/lib /usr/lib/x86_64-linux-gnu) # Tell pkg-config to look for libraries set(ENV{PKG_CONFIG_PATH} "/usr/lib/x86_64-linux-gnu/pkgconfig") set(CMAKE_C_FLAGS "-m64 -fsigned-char -fPIC -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict -Wno-error=array-bounds" CACHE STRING "Flags for Linux64") set(CMAKE_CXX_FLAGS "-m64 -fsigned-char -fPIC -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict -Wno-error=array-bounds" CACHE STRING "Flags for Linux64") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "c++ Release flags" ) set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "c Release flags" ) set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c++ Debug flags" ) set(CMAKE_C_FLAGS_DEBUG "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c Debug flags" ) set(CMAKE_SKIP_RPATH 1) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--enable-new-dtags,-R,\\\$ORIGIN" CACHE STRING "Flags executables") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--enable-new-dtags,-R,\\\$ORIGIN" CACHE STRING "Flags shared") set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_FIND_LIBRARY_SUFFIXES}) set(SCOL_INSTALL_PREFIX "linux64") add_definitions(-DLINUX)