diff --git a/About-Apple.cmake b/About-Apple.cmake index 85a489aa3..8ee80bb54 100644 --- a/About-Apple.cmake +++ b/About-Apple.cmake @@ -12,7 +12,7 @@ add_custom_target (AboutFile ALL COMMAND rm -f ${OUT_FILE} COMMAND rm -f ${VERSION_FILE} COMMAND for i in \$\( hg branch \)\; do echo Branch: $i >${OUT_FILE}\; done - COMMAND hg parents --template=\"Version: {latesttag}_{latesttagdistance}\\nChangset: {node}\\n\" >>${OUT_FILE} + COMMAND hg parents --template=\"Version: {latesttag}.{latesttagdistance}\\nChangset: {node|short}\\n\" >>${OUT_FILE} COMMAND for i in \$\( gcc -dumpversion \) \;do echo Compiler: GCC $i >>${OUT_FILE} \; done COMMAND echo Processor: ${PROC_LABEL} >>${OUT_FILE} COMMAND echo Bit depth: ${PROC_BIT_DEPTH} >>${OUT_FILE} diff --git a/About-Linux.cmake b/About-Linux.cmake index 85a489aa3..8ee80bb54 100644 --- a/About-Linux.cmake +++ b/About-Linux.cmake @@ -12,7 +12,7 @@ add_custom_target (AboutFile ALL COMMAND rm -f ${OUT_FILE} COMMAND rm -f ${VERSION_FILE} COMMAND for i in \$\( hg branch \)\; do echo Branch: $i >${OUT_FILE}\; done - COMMAND hg parents --template=\"Version: {latesttag}_{latesttagdistance}\\nChangset: {node}\\n\" >>${OUT_FILE} + COMMAND hg parents --template=\"Version: {latesttag}.{latesttagdistance}\\nChangset: {node|short}\\n\" >>${OUT_FILE} COMMAND for i in \$\( gcc -dumpversion \) \;do echo Compiler: GCC $i >>${OUT_FILE} \; done COMMAND echo Processor: ${PROC_LABEL} >>${OUT_FILE} COMMAND echo Bit depth: ${PROC_BIT_DEPTH} >>${OUT_FILE} diff --git a/About-Windows.cmake b/About-Windows.cmake index b3a572192..5f8a5a426 100644 --- a/About-Windows.cmake +++ b/About-Windows.cmake @@ -8,7 +8,7 @@ set (VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/rtgui/version.h") add_custom_target (AboutFile ALL COMMAND for /F \"tokens=*\" %%i in \('hg branch'\) do echo Branch: %%i >${OUT_FILE} - COMMAND hg parents --template=\"Version: {latesttag}_{latesttagdistance}\\nChangset: {node}\\n\" >>${OUT_FILE} + COMMAND hg parents --template=\"Version: {latesttag}.{latesttagdistance}\\nChangset: {node|short}\\n\" >>${OUT_FILE} COMMAND for /F \"tokens=*\" %%i in \('gcc -dumpversion'\) do echo Compiler: GCC%%i >>${OUT_FILE} COMMAND \(echo Processor: ${PROC_LABEL}\) >>${OUT_FILE} COMMAND \(echo Bit depth: ${PROC_BIT_DEPTH}\) >>${OUT_FILE} diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a80e8d32..9deb4bf60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,11 @@ if (PROC_TARGET_NUMBER GREATER 0) set (PROC_FLAGS ${PROC_TARGET_${PROC_TARGET_NUMBER}_FLAGS}) endif (PROC_TARGET_NUMBER GREATER 0) +# if it exists, the PROC_FORCED_LABEL value is loaded in PROC_LABEL to override the one of ProcessorTargets +if (DEFINED PROC_FORCED_LABEL) + set (PROC_LABEL ${PROC_FORCED_LABEL}) +endif (DEFINED PROC_FORCED_LABEL) + # adding the proc flags to the build flags set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PROC_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PROC_FLAGS}") diff --git a/ProcessorTargets.cmake b/ProcessorTargets.cmake index 4ef65a44c..43260a360 100644 --- a/ProcessorTargets.cmake +++ b/ProcessorTargets.cmake @@ -1,33 +1,33 @@ # We have to create a label variable if we want to display it in AboutThisBuild.txt... # This first choice should be used for official releases -set(PROC_TARGET_1_LABEL "generic x86" CACHE STRING "Processor-1 label - should be used for official Windows release") +set(PROC_TARGET_1_LABEL generic x86 CACHE STRING "Processor-1 label - should be used for official Windows release") set(PROC_TARGET_1_FLAGS "-mtune=generic" CACHE STRING "Processor-1 flags") # This second choice should be used for your own build only -set(PROC_TARGET_2_LABEL "native" CACHE STRING "Processor-2 label - use it for your own build") +set(PROC_TARGET_2_LABEL native CACHE STRING "Processor-2 label - use it for your own build") set(PROC_TARGET_2_FLAGS "-march=native" CACHE STRING "Processor-2 flags") # The later choices is intended to be used if you want to provide specific builds, but it should match your own processor # You can cross compile but you have to know what you're doing, this mechanism has not been designed for that -set(PROC_TARGET_3_LABEL "pentium/no-sse" CACHE STRING "Processor-3 label - use it to provide a pentium/no sse optimized build, if you have this processor") +set(PROC_TARGET_3_LABEL pentium/no-sse CACHE STRING "Processor-3 label - use it to provide a pentium/no sse optimized build, if you have this processor") set(PROC_TARGET_3_FLAGS "-march=pentium -mfpmath=387" CACHE STRING "Processor-3 flags") -set(PROC_TARGET_4_LABEL "pentium4" CACHE STRING "Processor-4 label - use it to provide a pentium4 optimized build, if you have this processor") +set(PROC_TARGET_4_LABEL pentium4 CACHE STRING "Processor-4 label - use it to provide a pentium4 optimized build, if you have this processor") set(PROC_TARGET_4_FLAGS "-march=pentium4 -mfpmath=sse" CACHE STRING "Processor-4 flags") -set(PROC_TARGET_5_LABEL "core2" CACHE STRING "Processor-5 label - use it to provide a core2 optimized build, if you have this processor") +set(PROC_TARGET_5_LABEL core2 CACHE STRING "Processor-5 label - use it to provide a core2 optimized build, if you have this processor") set(PROC_TARGET_5_FLAGS "-march=core2 -mfpmath=sse" CACHE STRING "Processor-5 flags") -set(PROC_TARGET_6_LABEL "corei7" CACHE STRING "Processor-6 label - use it to provide a corei7 optimized build, if you have this processor") +set(PROC_TARGET_6_LABEL corei7 CACHE STRING "Processor-6 label - use it to provide a corei7 optimized build, if you have this processor") set(PROC_TARGET_6_FLAGS "-march=corei7 -mfpmath=sse" CACHE STRING "Processor-6 flags") -set(PROC_TARGET_7_LABEL "athlon-4" CACHE STRING "Processor-7 label - use it to provide a athlon-4 optimized build, if you have this processor") +set(PROC_TARGET_7_LABEL athlon-4 CACHE STRING "Processor-7 label - use it to provide a athlon-4 optimized build, if you have this processor") set(PROC_TARGET_7_FLAGS "-march=athlon-4 -mfpmath=sse" CACHE STRING "Processor-7 flags") -set(PROC_TARGET_8_LABEL "athlon64" CACHE STRING "Processor-8 label - use it to provide a athlon64 optimized build, if you have this processor") +set(PROC_TARGET_8_LABEL athlon64 CACHE STRING "Processor-8 label - use it to provide a athlon64 optimized build, if you have this processor") set(PROC_TARGET_8_FLAGS "-march=pentium2 -mtune=athlon64 -mfpmath=sse" CACHE STRING "Processor-8 flags") -#set(PROC_TARGET__LABEL "" CACHE STRING "Processor- label") -#set(PROC_TARGET__FLAGS "" CACHE STRING "Processor- flags") +#set(PROC_TARGET__LABEL procLabel CACHE STRING "Processor- label") +#set(PROC_TARGET__FLAGS "procFlags" CACHE STRING "Processor- flags") diff --git a/Win32CMakeOptions-Sample.txt b/Win32CMakeOptions-Sample.txt index 78c3d1844..73a763f51 100644 --- a/Win32CMakeOptions-Sample.txt +++ b/Win32CMakeOptions-Sample.txt @@ -18,9 +18,11 @@ set(OPTION_OMP ON CACHE BOOL "Use OpenMP to speedup the preview and batch proces # set WITH_MYFILE_MMAP to OFF if you experience crash with thumbnail creation (it should be slower, but more reliable) set(WITH_MYFILE_MMAP ON CACHE BOOL "Use the MMAP mechanism to speedup thumbnail creations") +# This line will let you chose the target number, and the associated processor set (PROC_TARGET_NUMBER 2 CACHE STRING "Target Processor") -# If you want to manually specify the target processor name, uncomment the line right under, and set its value -#set (PROC_LABEL 'Core i7' X2 CACHE STRING "Target Processor label") + +# If you want to force the target processor name, uncomment the next line, and replace labelWithoutQuotes by its value +#set (PROC_FORCED_LABEL labelWithoutQuotes CACHE STRING "Target Processor label") set(CMAKE_CXX_FLAGS "-mwin32 -mthreads" CACHE STRING "Compiler options for C++ source files") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g2" CACHE STRING "Compiler options for C++ source files and Debug target") @@ -28,7 +30,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "-mwindows -DNDEBUG -O2" CACHE STRING "Compiler opti set(CMAKE_CXX_FLAGS_MINSIZEREL "-mwindows -DNDEBUG -Os" CACHE STRING "Compiler options for C++ source files and MinSizeRel target") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Compiler options for C++ source files and RelWithDebInfo target") -# Uncomment the next line and set the right value to override the default value +# Uncomment the next line and set the right value to override the default value (special compiling flags for RTEngine) #set(RTENGINE_CXX_FLAGS "-funroll-loops" CACHE STRING "Special compilation flags for RTEngine") set(CMAKE_C_FLAGS "-mwin32 -mthreads" CACHE STRING "Compiler options for C source files")