mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
remove function_timer from all compilations
This commit is contained in:
parent
03a47ba7e4
commit
1c5a699340
@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.3)
|
cmake_minimum_required(VERSION 3.3)
|
||||||
project(Algorithms_in_C
|
project(Algorithms_in_C
|
||||||
LANGUAGES C CXX
|
LANGUAGES C
|
||||||
VERSION 1.0.0
|
VERSION 1.0.0
|
||||||
DESCRIPTION "Set of algorithms implemented in C."
|
DESCRIPTION "Set of algorithms implemented in C."
|
||||||
)
|
)
|
||||||
@ -38,18 +38,6 @@ set(DOXYGEN_GENERATE_MAN NO)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
function(function_timer)
|
|
||||||
set(CMAKE_BUILD_TYPE "Release") # This is local to function
|
|
||||||
add_subdirectory(function_timer EXCLUDE_FROM_ALL)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function_timer()
|
|
||||||
|
|
||||||
include_directories(function_timer/include)
|
|
||||||
# link_libraries(function_timer)
|
|
||||||
# include_directories(${CMAKE_BINARY_DIR}/include)
|
|
||||||
# link_directories(${CMAKE_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE})
|
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 11)
|
set(CMAKE_C_STANDARD 11)
|
||||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
@ -13,9 +13,6 @@ foreach( testsourcefile ${APP_SOURCES} )
|
|||||||
|
|
||||||
add_executable( ${testname} ${testsourcefile} )
|
add_executable( ${testname} ${testsourcefile} )
|
||||||
|
|
||||||
# Make sure YourLib is linked to each app
|
|
||||||
target_link_libraries( ${testname} function_timer )
|
|
||||||
set_target_properties(${testname} PROPERTIES LINKER_LANGUAGE C)
|
|
||||||
if(OpenMP_C_FOUND)
|
if(OpenMP_C_FOUND)
|
||||||
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
||||||
endif()
|
endif()
|
||||||
|
@ -13,9 +13,7 @@ foreach( testsourcefile ${APP_SOURCES} )
|
|||||||
# I used a simple string replace, to cut off .cpp.
|
# I used a simple string replace, to cut off .cpp.
|
||||||
string( REPLACE ".c" "" testname ${testsourcefile} )
|
string( REPLACE ".c" "" testname ${testsourcefile} )
|
||||||
add_executable( ${testname} ${testsourcefile} )
|
add_executable( ${testname} ${testsourcefile} )
|
||||||
# Make sure YourLib is linked to each app
|
|
||||||
target_link_libraries( ${testname} function_timer )
|
|
||||||
set_target_properties(${testname} PROPERTIES LINKER_LANGUAGE C)
|
|
||||||
if(OpenMP_C_FOUND)
|
if(OpenMP_C_FOUND)
|
||||||
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
||||||
endif()
|
endif()
|
||||||
|
@ -21,9 +21,6 @@ foreach( testsourcefile ${APP_SOURCES} )
|
|||||||
|
|
||||||
add_executable( ${testname} ${testsourcefile} )
|
add_executable( ${testname} ${testsourcefile} )
|
||||||
|
|
||||||
# Make sure YourLib is linked to each app
|
|
||||||
target_link_libraries( ${testname} function_timer )
|
|
||||||
set_target_properties(${testname} PROPERTIES LINKER_LANGUAGE C)
|
|
||||||
if(OpenMP_C_FOUND)
|
if(OpenMP_C_FOUND)
|
||||||
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
||||||
endif()
|
endif()
|
||||||
|
@ -15,8 +15,7 @@ foreach( testsourcefile ${APP_SOURCES} )
|
|||||||
string( REPLACE "\\" "-" testname ${testname} )
|
string( REPLACE "\\" "-" testname ${testname} )
|
||||||
string( REPLACE " " "_" testname ${testname} )
|
string( REPLACE " " "_" testname ${testname} )
|
||||||
add_executable( ${testname} ${testsourcefile} )
|
add_executable( ${testname} ${testsourcefile} )
|
||||||
# Make sure YourLib is linked to each app
|
|
||||||
target_link_libraries( ${testname} function_timer )
|
|
||||||
if(OpenMP_C_FOUND)
|
if(OpenMP_C_FOUND)
|
||||||
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
||||||
endif()
|
endif()
|
||||||
|
@ -12,9 +12,7 @@ foreach( testsourcefile ${APP_SOURCES} )
|
|||||||
# I used a simple string replace, to cut off .cpp.
|
# I used a simple string replace, to cut off .cpp.
|
||||||
string( REPLACE ".c" "" testname ${testsourcefile} )
|
string( REPLACE ".c" "" testname ${testsourcefile} )
|
||||||
add_executable( ${testname} ${testsourcefile} )
|
add_executable( ${testname} ${testsourcefile} )
|
||||||
# Make sure YourLib is linked to each app
|
|
||||||
target_link_libraries( ${testname} function_timer )
|
|
||||||
set_target_properties(${testname} PROPERTIES LINKER_LANGUAGE C)
|
|
||||||
if(OpenMP_C_FOUND)
|
if(OpenMP_C_FOUND)
|
||||||
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
||||||
endif()
|
endif()
|
||||||
|
@ -12,9 +12,7 @@ foreach( testsourcefile ${APP_SOURCES} )
|
|||||||
# I used a simple string replace, to cut off .cpp.
|
# I used a simple string replace, to cut off .cpp.
|
||||||
string( REPLACE ".c" "" testname ${testsourcefile} )
|
string( REPLACE ".c" "" testname ${testsourcefile} )
|
||||||
add_executable( ${testname} ${testsourcefile} )
|
add_executable( ${testname} ${testsourcefile} )
|
||||||
# Make sure YourLib is linked to each app
|
|
||||||
target_link_libraries( ${testname} function_timer )
|
|
||||||
set_target_properties(${testname} PROPERTIES LINKER_LANGUAGE C)
|
|
||||||
if(OpenMP_C_FOUND)
|
if(OpenMP_C_FOUND)
|
||||||
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
target_link_libraries(${testname} OpenMP::OpenMP_C)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user