File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,23 @@ target_compile_definitions(nanothread PRIVATE -DNANOTHREAD_BUILD=1)
7878set_target_properties (nanothread PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE )
7979
8080if (NANOTHREAD_ENABLE_TESTS)
81- add_subdirectory (tests )
81+ include (CTest )
82+ add_subdirectory (tests )
8283endif ()
8384
84- configure_file (nanothreadConfig.cmake "${CMAKE_CURRENT_BINARY_DIR} /nanothread/nanothreadConfig.cmake" COPYONLY )
85+ include (CMakePackageConfigHelpers )
86+ file (WRITE "${CMAKE_CURRENT_BINARY_DIR} /nanothreadConfig.cmake.in" [=[
87+ @PACKAGE_INIT@
88+ include("${CMAKE_CURRENT_LIST_DIR}/nanothreadTargets.cmake")
89+ ]=] )
90+ configure_package_config_file (
91+ "${CMAKE_CURRENT_BINARY_DIR} /nanothreadConfig.cmake.in"
92+ "${CMAKE_CURRENT_BINARY_DIR} /nanothreadConfig.cmake"
93+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/nanothread
94+ )
8595install (
8696 FILES
87- nanothreadConfig.cmake
97+ " ${CMAKE_CURRENT_BINARY_DIR} / nanothreadConfig.cmake"
8898 DESTINATION
8999 ${CMAKE_INSTALL_LIBDIR} /cmake/nanothread
90100)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11add_executable (test_01 test_01.c )
22target_link_libraries (test_01 PRIVATE nanothread )
3+ add_test (NAME test_01 COMMAND test_01 )
34
45add_executable (test_02 test_02.cpp )
56target_link_libraries (test_02 PRIVATE nanothread )
67target_compile_features (test_02 PRIVATE cxx_std_11 )
8+ add_test (NAME test_02 COMMAND test_02 )
79
810add_executable (test_03 test_03.cpp )
911target_link_libraries (test_03 PRIVATE nanothread )
1012target_compile_features (test_03 PRIVATE cxx_std_14 )
13+ add_test (NAME test_03 COMMAND test_03 )
1114
1215add_executable (test_04 test_04.cpp )
1316target_link_libraries (test_04 PRIVATE nanothread )
1417target_compile_features (test_04 PRIVATE cxx_std_11 )
18+ add_test (NAME test_04 COMMAND test_04 )
You can’t perform that action at this time.
0 commit comments