Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -732,9 +732,9 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${PARSEC_INSTALL_LIBDIR}" isSystemDir)
#MESSAGE(STATUS "LINK_DIRECTORIES = ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}")
#MESSAGE(STATUS "INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}/${PARSEC_INSTALL_LIBDIR}")
IF("${isSystemDir}" STREQUAL "-1")
IF(isSystemDir STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${PARSEC_INSTALL_LIBDIR}")
ENDIF("${isSystemDir}" STREQUAL "-1")
ENDIF(isSystemDir STREQUAL "-1")

# Prepare the list of include directories. From the source directory we need 2 the source
# itself and then the specialized headers from parsec/include. If we compile with VPATH
Expand Down Expand Up @@ -858,7 +858,7 @@ string(REPLACE " " ";" SHM_TEST_CMD_LIST "${CTEST_SHM_LAUNCHER}")
set(CTEST_MPI_LAUNCHER
"${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG}" CACHE STRING
"A command to run distributed memory testings")
if( "${CTEST_MPI_LAUNCHER}" STREQUAL "" )
if( CTEST_MPI_LAUNCHER STREQUAL "" )
MESSAGE(WARNING "MPI tests will most likely not work: 'CTEST_MPI_LAUNCHER' is not set")
endif()
string(REPLACE " " ";" MPI_TEST_CMD_LIST "${CTEST_MPI_LAUNCHER}")
Expand Down
4 changes: 2 additions & 2 deletions cmake_modules/AddDocumentedFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ function(add_documented_files)
set(multiValueArgs FILES)
cmake_parse_arguments(PARSE_ARGV 0 "ADF" "${options}" "${oneValueArgs}" "${multiValueArgs}")

if("${ADF_DIR}" STREQUAL "")
if(ADF_DIR STREQUAL "")
set(BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
else()
set(BASE_DIR "${ADF_DIR}")
endif()

if("${ADF_PROJECT}" STREQUAL "" OR "${ADF_FILES}" STREQUAL "")
if(ADF_PROJECT STREQUAL "" OR ADF_FILES STREQUAL "")
MESSAGE(FATAL_ERROR "add_documented_files: need to specify PROJECT (current: '${ADF_PROJECT}') and FILES (current: '${ADF_FILES}')")
else()
get_property(is_defined GLOBAL PROPERTY ${ADF_PROJECT}_DOX_SRCS DEFINED)
Expand Down
8 changes: 4 additions & 4 deletions cmake_modules/CheckStructureFieldOffset.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ function(__check_structure_field_offset_impl field structure var map language)
set(mismatch)
set(first 1)
foreach(info ${strings})
if("${info}" MATCHES "${regex_offset}")
if(info MATCHES "${regex_offset}")
# Get the type size.
set(offset "${CMAKE_MATCH_1}")
if(first)
set(${var} ${offset})
elseif(NOT "${offset}" STREQUAL "${${var}}")
elseif(NOT offset STREQUAL "${${var}}")
set(mismatch 1)
endif()
set(first 0)
Expand Down Expand Up @@ -166,10 +166,10 @@ macro(CHECK_STRUCTURE_FIELD_OFFSET FIELD STRUCTURE VARIABLE)
# parse arguments
unset(doing)
foreach(arg ${ARGN})
if("x${arg}" STREQUAL "xLANGUAGE") # change to MATCHES for more keys
if(arg STREQUAL "LANGUAGE") # change to MATCHES for more keys
set(doing "${arg}")
set(_CHECK_STRUCTURE_FIELD_OFFSET_${doing} "")
elseif("x${doing}" STREQUAL "xLANGUAGE")
elseif(doing STREQUAL "LANGUAGE")
set(_CHECK_STRUCTURE_FIELD_OFFSET_${doing} "${arg}")
unset(doing)
else()
Expand Down
2 changes: 1 addition & 1 deletion cmake_modules/FindCython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if( CYTHON_EXECUTABLE )
OUTPUT_QUIET
ERROR_STRIP_TRAILING_WHITESPACE)
string(REPLACE "Cython version " "" CYTHON_VERSION "${CYTHON_OUTPUT}")
if( "${CYTHON_VERSION}" VERSION_LESS "0.19.1" )
if( CYTHON_VERSION VERSION_LESS "0.19.1" )
MESSAGE(STATUS "Cython version ${CYTHON_VERSION} found -- too old for current code")
unset(CYTHON_EXECUTABLE CACHE)
else()
Expand Down
8 changes: 4 additions & 4 deletions cmake_modules/FindGD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ IF (GD_FOUND)
FOREACH(GD_DIR ${GD_INCLUDE_DIR})
SET(GD_TMP_FOUND OFF)
FOREACH(GD_TRIMMED ${GDINCTRIM})
IF ("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
IF (GD_DIR STREQUAL GD_TRIMMED)
SET(GD_TMP_FOUND ON)
ENDIF ("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
ENDIF (GD_DIR STREQUAL GD_TRIMMED)
ENDFOREACH(GD_TRIMMED ${GDINCTRIM})
IF (NOT GD_TMP_FOUND)
SET(GDINCTRIM "${GDINCTRIM}" "${GD_DIR}")
Expand All @@ -88,9 +88,9 @@ IF (GD_FOUND)
GET_FILENAME_COMPONENT(GD_NEXTLIBDIR ${GD_LIB} PATH)
SET(GD_TMP_FOUND OFF)
FOREACH(GD_LIBDIR ${GD_LIBRARY_DIR})
IF ("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
IF (GD_NEXTLIBDIR STREQUAL GD_LIBDIR)
SET(GD_TMP_FOUND ON)
ENDIF ("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
ENDIF (GD_NEXTLIBDIR STREQUAL GD_LIBDIR)
ENDFOREACH(GD_LIBDIR ${GD_LIBRARIES})
IF (NOT GD_TMP_FOUND)
SET(GD_LIBRARY_DIR "${GD_LIBRARY_DIR}" "${GD_NEXTLIBDIR}")
Expand Down
19 changes: 9 additions & 10 deletions cmake_modules/ParsecCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ function(check_and_set_compiler_option)
endif()
endforeach()
set(CMAKE_REQUIRED_QUIET ${save_CMAKE_REQUIRED_QUIET})
if( "${_supported_languages}" STREQUAL "" )
if( _supported_languages STREQUAL "" )
message(CHECK_FAIL "[none]")
else( "${_supported_languages}" STREQUAL "" )
else( _supported_languages STREQUAL "" )
message(CHECK_PASS "[${_supported_languages}]")
endif( "${_supported_languages}" STREQUAL "" )
endif( _supported_languages STREQUAL "" )

if(DEFINED parsec_cas_co_COMMENT)
set(${parsec_cas_co_NAME} "${parsec_cas_co_defined_options}" CACHE STRING "${parsec_cas_co_COMMENT}")
Expand Down Expand Up @@ -106,7 +106,7 @@ if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
if( _match_xlc)
set( arch_build "-q64" )
else (_match_xlc)
if( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "sparc64fx" )
if( CMAKE_SYSTEM_PROCESSOR STREQUAL "sparc64fx" )
set ( arch_build " " )
else()
set( arch_build "-m64" )
Expand Down Expand Up @@ -168,8 +168,7 @@ if(_match_icc)
endif(_match_icc)

# remove asserts in release
add_compile_definitions(
$<$<CONFIG:RELEASE>:NDEBUG>)
add_compile_definitions($<$<CONFIG:RELEASE>:NDEBUG>)

if(CMAKE_GENERATOR STREQUAL "Ninja")
# Ninja is weird with colors. It does not present a pty to cc (hence
Expand All @@ -187,9 +186,9 @@ endif()
if(CMAKE_Fortran_COMPILER_WORKS)
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
# message(STATUS "Fortran Compiler ${Fortran_COMPILER_NAME} id is ${CMAKE_Fortran_COMPILER_ID}")
if(${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
# gfortran or g77
if(${Fortran_COMPILER_NAME} MATCHES g77)
if(Fortran_COMPILER_NAME MATCHES g77)
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:-fno-f2c>")
endif()
# We append the implicit fortran link flags for the case where FC=/somepath/f90
Expand All @@ -200,11 +199,11 @@ if(CMAKE_Fortran_COMPILER_WORKS)
list(APPEND EXTRA_LIBS "-L${item}")
endforeach()
list(APPEND EXTRA_LIBS ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
# ifort
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:-f77rtl>")
# This is a bug in CMake, which incorrectly adds this flag that does not exist on some ifort versions.
string (REPLACE "-i_dynamic" "" CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS}")
endif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
endif (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
endif(CMAKE_Fortran_COMPILER_WORKS)

8 changes: 4 additions & 4 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ if (BUILD_DOCUMENTATION)
find_package(Doxygen)

if (DOXYGEN_FOUND)
if(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
if(NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
message(STATUS "PaRSEC is pulled as a submodule -- Not generating documentation")
return()
elseif( ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} )
elseif(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
message(FATAL_ERROR
"Because PaRSEC generates many source files at compile time, "
"no documentation will be generated when building directly within "
"the source directory. To generate the documentation, re-configure "
"and compile from an out-of-source directory (look for "
"Out-of-source build trees with CMake for documentation)")
else(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
else(NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
get_property(SRCS GLOBAL PROPERTY PARSEC_DOX_SRCS)
string (REPLACE ";" " " PARSEC_DOX_SRCS "${SRCS}")

Expand All @@ -37,7 +37,7 @@ if (BUILD_DOCUMENTATION)
#-- Add a custom target to run Doxygen when the project is built
add_custom_target(docs-parsec DEPENDS parsec ${CMAKE_CURRENT_BINARY_DIR}/doxygen/doxygen.stamp )
message(STATUS "PaRSEC documentation can be generated with target 'docs-parsec' after the library is compiled")
endif(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
endif(NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
else (DOXYGEN_FOUND)
message(FATAL_ERROR "Documentation generation requested but Doxygen application could not be found. Either install Doygen or disable the documentation generation (BUILD_DOCUMENTATION to OFF)")
endif (DOXYGEN_FOUND)
Expand Down
3 changes: 1 addition & 2 deletions parsec/fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
include(FortranCInterface)
FortranCInterface_HEADER(f2c_mangle.h
MACRO_NAMESPACE "PARSEC_F2C_"
SYMBOL_NAMESPACE "parsec_f2c_"
SYMBOLS my_sub parsecf:my_sub)
Comment thread
bosilca marked this conversation as resolved.
SYMBOL_NAMESPACE "parsec_f2c_")

set(sources
parsecf.F90 parsecf.c)
Expand Down