]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
CMake: IF(WINDOWS) is deprecated - please always use IF(WIN32)
authorbruneton <bruneton>
Wed, 18 Sep 2013 09:08:52 +0000 (09:08 +0000)
committerbruneton <bruneton>
Wed, 18 Sep 2013 09:08:52 +0000 (09:08 +0000)
CMakeLists.txt
doc/docutils/CMakeLists.txt
idl/CMakeLists.txt
salome_adm/cmake_files/FindCAS.cmake
salome_adm/cmake_files/FindSalomeHDF5.cmake
salome_adm/cmake_files/FindSalomeOmniORBPy.cmake
salome_adm/cmake_files/FindSalomePython.cmake
salome_adm/cmake_files/UseOmniORB.cmake
src/DSC/CMakeLists.txt
src/SALOMEDS/CMakeLists.txt
src/SALOMEDS/Test/CMakeLists.txt

index db000aea71611b7cbfec40a91111899a83f0f34e..6785f287875548668da3fa9021d39fee945398c0 100755 (executable)
@@ -192,10 +192,10 @@ INCLUDE(CMakePackageConfigHelpers)
 # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
 
 # Temporary solution for pakage src\DSC on windows
-IF(NOT WINDOWS)
+IF(NOT WIN32)
   SET(DSC_TGS CalciumC SalomeCalcium SalomeDatastream 
   SalomePalm SalomeDSCSupervBasic SalomeDSCSuperv)
-ENDIF(NOT WINDOWS)
+ENDIF()
 
 SET(_${PROJECT_NAME}_exposed_targets
   ${DSC_TGS} DF Launcher OpUtil Registry ResourcesManager 
index 9ceadd85544207a1e2d8d0e0531c7972e9a86b1a..c787e1b33a992b98564587cc867dfea11b6bb78f 100755 (executable)
@@ -45,7 +45,7 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py)
 #    Their root dir were found when looking for Sphinx (FindSalomeSphinx.cmake):
 
 SET(_pydir python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
-IF(WINDOWS)
+IF(WIN32)
   STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\lib\\${_pydir}\\site-packages\\salome\;%PYTHONPATH%
   @SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\bin\\salome\;%PYTHONPATH%
   @SET PATH=${CMAKE_INSTALL_PREFIX}\\lib\\salome\;%PATH%
@@ -55,7 +55,7 @@ IF(WINDOWS)
   ")
   SET(EXT "bat")
   SET(CALL_STR "call")
-ELSE(WINDOWS)
+ELSE(WIN32)
   SET(SCR  " export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/${_pydir}/site-packages/salome:\${PYTHONPATH}
   export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome:\${PYTHONPATH}
   export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/salome:\${LD_LIBRARY_PATH}
@@ -75,7 +75,7 @@ ELSE(WINDOWS)
   ENDIF()
   SET(EXT "sh")
   SET(CALL_STR ".")
-ENDIF(WINDOWS)
+ENDIF(WIN32)
 
 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")
 
index 813ec82c6739271c30cd8ba1b6162b22105c039b..4362cb8151f5bb9bc75985d3f9b70eb9a14c0886 100755 (executable)
@@ -66,12 +66,12 @@ SET(IDL_INCLUDE_DIRS
 
 SET(COMMON_FLAGS ${OMNIORB_DEFINITIONS})
 SET(TYPE)
-IF(WINDOWS)
+IF(WIN32)
   SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
   SET(TYPE STATIC)
-ELSE(WINDOWS)
+ELSE(WIN32)
   SET(TYPE SHARED)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
 
 OMNIORB_ADD_MODULE(SalomeIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}")
 ADD_DEFINITIONS(${COMMON_FLAGS})
index 05b0061a504e2cf90535d5d3afab9afbcf17532d..8aa50cb478e01c149c7c4a8c5a99d87ea2250330 100644 (file)
@@ -62,9 +62,9 @@ SET(CAS_DEFINITIONS "-DLIN -DLINTEL -DCSFDB")
 SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DNo_exception")
 
 # No config.h file in the OPEN CASCADE on WINDOWS platform 
-IF(NOT WINDOWS)
+IF(NOT WIN32)
  SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DHAVE_CONFIG_H")
-ENDIF(NOT WINDOWS)
+ENDIF()
 
 SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DOCC_CONVERT_SIGNALS")
 
index d607ef7df6219466e11b289fc18b60f23b0e0222..9b25dbeb298aeb0819409c4aaa8f800554ecce7c 100644 (file)
 #  MPI root directory used for HDF5 compilation is exposed into MPI_ROOT_DIR_EXP
 #
 
-if(WINDOWS)
+if(WIN32)
   set(PREV_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
   set(CMAKE_FIND_LIBRARY_SUFFIXES dll${CMAKE_IMPORT_LIBRARY_SUFFIX})
-endif(WINDOWS)
+endif()
 
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(HDF5 HDF5_INCLUDE_DIR 1)
 MARK_AS_ADVANCED(FORCE HDF5_INCLUDE_DIR HDF5_LIB HDF5_DIR)
@@ -80,6 +80,6 @@ IF(HDF5_IS_PARALLEL AND NOT SALOME_USE_MPI)
    MESSAGE(FATAL_ERROR "HDF5 is compiled with MPI, you have to set SALOME_USE_MPI to ON")
 ENDIF()
 
-if(WINDOWS)
+if(WIN32)
   set(CMAKE_FIND_LIBRARY_SUFFIXES ${PREV_CMAKE_FIND_LIBRARY_SUFFIXES})
-endif(WINDOWS)
+endif()
index 229d54d2437b52c22d2312968d0c5ac2a5e91488..3e4a0c4932ef5ff812546e8186efa95f839d3831 100644 (file)
@@ -35,11 +35,11 @@ IF(SalomeOmniORB_FOUND)
     ENDIF()
   ENDIF()
 
-  IF(WINDOWS)
+  IF(WIN32)
     SET(DIR_COUNT 3) 
-  ELSE(WINDOWS)
+  ELSE(WIN32)
     SET(DIR_COUNT 4) 
-  ENDIF(WINDOWS)
+  ENDIF(WIN32)
 
   SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OmniORBPy OMNIORB_PYTHON_BACKEND ${DIR_COUNT})
   #MARK_AS_ADVANCED()
index d7e2ba8240d8a428e21a7dcafc7498cae0c452fe..26b86dcf7c0ecae93a9df54b091dd77be6bba203 100644 (file)
@@ -45,12 +45,12 @@ ENDIF()
 SET(PYTHON_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to Python directory (interpreter and libs)")
 
 # 2. Find package - config mode first (i.e. looking for XYZ-config.cmake)
-IF(WINDOWS)
+IF(WIN32)
  IF(CMAKE_BUILD_TYPE STREQUAL Debug)
   SET(PythonInterp_FIND_VERSION _d)
   SET(PYTHON_DEFINITIONS "-DHAVE_DEBUG_PYTHON")
  ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
 IF(EXISTS "${PYTHON_ROOT_DIR}")
   # Hope to find direclty a CMake config file there
   SET(_CONF_DIR "${PYTHON_ROOT_DIR}/share/cmake") 
index 7d63d22f26c85bf767487d7003e3d94dfc66202e..860308ed9f6152396cfe512d410e2de81a72cc5b 100644 (file)
@@ -19,9 +19,9 @@
 
 INSTALL( CODE "
 SET(INSTALL_PYIDL_DIR lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/salome) # R1 CHECK
-IF(WINDOWS)
+IF(WIN32)
   SET(INSTALL_PYIDL_DIR bin/salome) # R1 CHECK
-ENDIF(WINDOWS)
+ENDIF(WIN32)
 
 MACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL MYOMNIORBIDLPYTHON MYIDLPYFLAGS MYIDLFILE MYFULLDIR)
   FILE(MAKE_DIRECTORY \${MYFULLDIR})
@@ -76,9 +76,13 @@ MACRO(OMNIORB_ADD_MODULE module idlfiles incdirs)
   SET(_sources)
   # type of the libraries: SHARED for Linux, STATIC for Windows
   SET(_type SHARED)
-  IF(WINDOWS)
+  IF(WIN32)
     SET(_type STATIC)
   ENDIF()
+  IF(NOT WIN32 AND (_type STREQUAL STATIC)) 
+    SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
+  ENDIF()
+
   # add additional include dirs to the C++ and Python backend options
   SET(_cxx_flags ${OMNIORB_IDLCXXFLAGS})
   SET(_py_flags "${OMNIORB_IDLPYFLAGS}")
index 1dfb7dbe7221d50cd05edac16cae9eaa9b2d799b..5c38b578e39a6addc51d807565dc1dd54f0caee2 100755 (executable)
@@ -21,12 +21,12 @@ SET(SUBDIRS_COMMON
   DSC_Basic
 )
 
-IF(NOT WINDOWS)
+IF(NOT WIN32)
   SET(SUBDIRS_ADD
     DSC_User
     DSC_Python
   )
-ENDIF(NOT WINDOWS)
+ENDIF()
 
 IF(SALOME_PACO_PARALLEL)
   SET(SUBDIR_PAR
index 1c7e51649d495d0358455c48b420711fbf1d2ecd..2e19bd81222525ca9a544eb49cb1e5cff81d8330 100755 (executable)
@@ -37,9 +37,9 @@ INCLUDE_DIRECTORIES(
 )
 
 ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
-IF(WINDOWS)
+IF(WIN32)
   ADD_DEFINITIONS(-DNOGDI)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
 
 SET(COMMON_LIBS
   TOOLSDS
index 7fd3f5fe43a57ec69e12c7b2903530c100d06a07..678d5172a889bd5a4db8e04e4f6a5c4ff322a4eb 100755 (executable)
@@ -67,9 +67,9 @@ SET(COMMON_LIBS
 
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
 
-IF(WINDOWS)
+IF(WIN32)
   ADD_DEFINITIONS(-DNOGDI)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
 
 ADD_LIBRARY(SALOMEDSTest SALOMEDSTest.cxx)
 TARGET_LINK_LIBRARIES(SALOMEDSTest ${COMMON_LIBS})