commit
f2e3e81572
|
@ -90,10 +90,12 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(GTSAM_BUILD_WITH_MARCH_NATIVE "Enable/Disable building with all instructions supported by native architecture (binary may not be portable!)" ON)
|
if (NOT MSVC)
|
||||||
if(GTSAM_BUILD_WITH_MARCH_NATIVE)
|
option(GTSAM_BUILD_WITH_MARCH_NATIVE "Enable/Disable building with all instructions supported by native architecture (binary may not be portable!)" ON)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
|
if(GTSAM_BUILD_WITH_MARCH_NATIVE)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Set up build type library postfixes
|
# Set up build type library postfixes
|
||||||
|
|
|
@ -120,6 +120,7 @@ macro(gtsamAddTestsGlob_impl groupName globPatterns excludedFiles linkLibraries)
|
||||||
# Add group target if it doesn't already exist
|
# Add group target if it doesn't already exist
|
||||||
if(NOT TARGET check.${groupName})
|
if(NOT TARGET check.${groupName})
|
||||||
add_custom_target(check.${groupName} COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> --output-on-failure)
|
add_custom_target(check.${groupName} COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> --output-on-failure)
|
||||||
|
set_property(TARGET check.${groupName} PROPERTY FOLDER "Unit tests")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Get all script files
|
# Get all script files
|
||||||
|
@ -192,7 +193,9 @@ macro(gtsamAddTestsGlob_impl groupName globPatterns excludedFiles linkLibraries)
|
||||||
# Add executable
|
# Add executable
|
||||||
add_executable(${target_name} "${script_srcs}" ${script_headers})
|
add_executable(${target_name} "${script_srcs}" ${script_headers})
|
||||||
target_link_libraries(${target_name} CppUnitLite ${linkLibraries})
|
target_link_libraries(${target_name} CppUnitLite ${linkLibraries})
|
||||||
|
|
||||||
|
set_property(TARGET check_${groupName}_program PROPERTY FOLDER "Unit tests")
|
||||||
|
|
||||||
# Only have a main function in one script - use preprocessor
|
# Only have a main function in one script - use preprocessor
|
||||||
set(rest_script_srcs ${script_srcs})
|
set(rest_script_srcs ${script_srcs})
|
||||||
list(REMOVE_AT rest_script_srcs 0)
|
list(REMOVE_AT rest_script_srcs 0)
|
||||||
|
|
Loading…
Reference in New Issue