You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
964 B
31 lines
964 B
include(RunCMake)
|
|
|
|
run_cmake(LINK_SEARCH_STATIC)
|
|
|
|
|
|
macro(run_cmake_target test subtest target)
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-build)
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
|
run_cmake_command(${test}-${subtest} ${CMAKE_COMMAND} --build . --target ${target} ${ARGN})
|
|
|
|
unset(RunCMake_TEST_BINARY_DIR)
|
|
unset(RunCMake_TEST_NO_CLEAN)
|
|
endmacro()
|
|
|
|
if (NOT CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
|
# Intel compiler does not reject bad flags or objects!
|
|
set(RunCMake_TEST_OUTPUT_MERGE TRUE)
|
|
if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
|
|
set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
|
|
endif()
|
|
|
|
run_cmake(STATIC_LIBRARY_OPTIONS)
|
|
|
|
run_cmake_target(STATIC_LIBRARY_OPTIONS basic StaticLinkOptions)
|
|
run_cmake_target(STATIC_LIBRARY_OPTIONS genex StaticLinkOptions_genex --config Release)
|
|
run_cmake_target(STATIC_LIBRARY_OPTIONS shared SharedLinkOptions)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
unset(RunCMake_TEST_OUTPUT_MERGE)
|
|
endif()
|