File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 11
11
12
12
cmake_minimum_required ( VERSION 2.8.8 FATAL_ERROR )
13
13
14
+ # Use MSVS folders to organize projects on windows
15
+ set_property (GLOBAL PROPERTY USE_FOLDERS ON )
16
+
14
17
set (PROJECT_DESCRIPTION "A Fortran 2008 JSON API" )
15
18
set (PROJECT_URL "https://github.com/jacobwilliams/json-fortran" )
16
19
@@ -239,7 +242,7 @@ if ( ENABLE_TESTS )
239
242
enable_testing ()
240
243
241
244
# emulate GNU Autotools `make check`
242
- add_custom_target (check COMMAND ${CMAKE_CTEST_COMMAND} )
245
+ add_custom_target (check COMMAND ${CMAKE_CTEST_COMMAND} -C $< CONFIG > )
243
246
244
247
find_program ( JSONLINT jsonlint )
245
248
find_program ( DIFF diff )
Original file line number Diff line number Diff line change @@ -8,16 +8,26 @@ if ( NOT Fortran_FLAGS_INIT )
8
8
"Enable compiler run-time checks? (Enabling this will turn off most compiler optimizations.)" )
9
9
mark_as_advanced ( ENABLE_RUNTIME_CHECKS )
10
10
11
+ if ( "${CMAKE_SYSTEM_NAME} " STREQUAL "Windows" )
12
+ set (pre / )
13
+ set (spc : )
14
+ set (Q /Q )
15
+ else ()
16
+ set (pre - )
17
+ set (spc " " )
18
+ set (Q - )
19
+ endif ()
11
20
if ( "${CMAKE_Fortran_COMPILER_ID} " MATCHES "Intel" )
21
+ set (TRACE_FLAG -traceback )
12
22
if ( ENABLE_BACK_TRACE )
13
- set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} - traceback" )
23
+ set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${pre} traceback" )
14
24
endif ()
15
25
if ( ENABLE_COMPILE_TIME_WARNINGS )
16
26
# The following warning might be triggered by ifort unless explicitly silenced:
17
27
# warning #7601: F2008 standard does not allow an internal procedure to be an actual argument procedure
18
28
# name. (R1214.4). In the context of F2008 this is an erroneous warning.
19
29
# See https://prd1idz.cps.intel.com/en-us/forums/topic/486629
20
- set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} - warn - stand f08 - diag-disable 7601 - diag-disable 5142" )
30
+ set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${pre} warn ${pre} stand${spc} f08 ${Q} diag-disable${spc} 7601 ${Q} diag-disable${spc} 5142" )
21
31
endif ()
22
32
if ( ENABLE_RUNTIME_CHECKS )
23
33
set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -check all" )
You can’t perform that action at this time.
0 commit comments