mirror of
https://github.com/boostorg/pfr.git
synced 2026-01-19 04:22:13 +00:00
Fix compatibility with CMake < 3.14 (#223)
`NAME_WLE` was introduced in 3.14
This commit is contained in:
@@ -8,7 +8,7 @@ endif()
|
|||||||
|
|
||||||
file(GLOB CORE_RUN_FILES "core/run/*.cpp")
|
file(GLOB CORE_RUN_FILES "core/run/*.cpp")
|
||||||
foreach (testsourcefile ${CORE_RUN_FILES})
|
foreach (testsourcefile ${CORE_RUN_FILES})
|
||||||
get_filename_component(testname ${testsourcefile} NAME_WLE)
|
get_filename_component(testname ${testsourcefile} NAME_WE)
|
||||||
add_executable(pfr_core_${testname} ${testsourcefile})
|
add_executable(pfr_core_${testname} ${testsourcefile})
|
||||||
target_link_libraries(pfr_core_${testname} Boost::pfr Boost::core Boost::container_hash)
|
target_link_libraries(pfr_core_${testname} Boost::pfr Boost::core Boost::container_hash)
|
||||||
target_include_directories(pfr_core_${testname} PRIVATE ../../../)
|
target_include_directories(pfr_core_${testname} PRIVATE ../../../)
|
||||||
@@ -18,7 +18,7 @@ endforeach()
|
|||||||
|
|
||||||
file(GLOB CORE_NAME_RUN_FILES "core_name/run/*.cpp")
|
file(GLOB CORE_NAME_RUN_FILES "core_name/run/*.cpp")
|
||||||
foreach (testsourcefile ${CORE_NAME_RUN_FILES})
|
foreach (testsourcefile ${CORE_NAME_RUN_FILES})
|
||||||
get_filename_component(testname ${testsourcefile} NAME_WLE)
|
get_filename_component(testname ${testsourcefile} NAME_WE)
|
||||||
add_executable(pfr_corename_${testname} ${testsourcefile})
|
add_executable(pfr_corename_${testname} ${testsourcefile})
|
||||||
target_compile_features(pfr_corename_${testname} PUBLIC cxx_std_20)
|
target_compile_features(pfr_corename_${testname} PUBLIC cxx_std_20)
|
||||||
target_link_libraries(pfr_corename_${testname} Boost::pfr Boost::core Boost::container_hash)
|
target_link_libraries(pfr_corename_${testname} Boost::pfr Boost::core Boost::container_hash)
|
||||||
|
|||||||
Reference in New Issue
Block a user