File tree Expand file tree Collapse file tree 3 files changed +5
-27
lines changed Expand file tree Collapse file tree 3 files changed +5
-27
lines changed Original file line number Diff line number Diff line change 1010
1111
1212# minimum required cmake version
13- cmake_minimum_required (VERSION 2.8.12)
14-
15-
16- # choose new behaviour for CMP0042
17- # see http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html for more details
18- if (POLICY CMP0042)
19- cmake_policy (SET CMP0042 NEW)
20- endif (POLICY CMP0042)
21-
13+ cmake_minimum_required (VERSION 3.10)
2214
2315#
2416# project information
2517#
26- if (${CMAKE_MAJOR_VERSION} EQUAL 3)
27- project ("test" LANGUAGES C Fortran)
28- else ()
29- project ("test" C Fortran)
30- endif ()
18+ project ("test" LANGUAGES C Fortran)
3119
3220
3321#
Original file line number Diff line number Diff line change 1010
1111
1212include_directories (../libfoo ../libheader)
13- if ("${CMAKE_VERSION} " VERSION_LESS "3.0.2" )
14- include_directories (../libheader)
15- endif ()
16-
1713add_executable (bar bar.c)
18-
1914target_link_libraries (bar foo)
20- if ("${CMAKE_VERSION} " VERSION_GREATER "3.0.2" )
21- target_link_libraries (bar header)
22- endif ()
23-
15+ target_link_libraries (bar header)
2416
2517add_test (test1 ${CMAKE_CURRENT_BINARY_DIR} /bar 1)
2618add_test (test2 ${CMAKE_CURRENT_BINARY_DIR} /bar 2)
Original file line number Diff line number Diff line change 88# Written by Alexander Haase, alexander.haase@rwth-aachen.de
99#
1010
11- if ("${CMAKE_VERSION} " VERSION_GREATER "3.0.2" )
12- add_library (header INTERFACE )
13- target_include_directories (header INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} )
14- endif ()
11+ add_library (header INTERFACE )
12+ target_include_directories (header INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} )
You can’t perform that action at this time.
0 commit comments