Skip to content

Commit

Permalink
Squashed commits of mz-cmaketools:
Browse files Browse the repository at this point in the history
commit 9ba73ad6e007d82fc34bf9da815484581c09fe80
Author: Marius Zwicker <[email protected]>
Date:   Sun Feb 2 16:11:08 2014 +0100

    Enabled 'help' flag of generator.sh

commit 1fc965174e77fd9f054ccd77cd66c2ca95115fd1
Author: Marius Zwicker <[email protected]>
Date:   Sun Feb 2 16:08:04 2014 +0100

    Minor fixes for toolchain detection

     - Fixed clang version matching
     - Removed obsolete CMAKE_SYSTEM_PROCESSOR definition as
       this is an optional variable anyway.
  • Loading branch information
emzeat committed Feb 2, 2014
1 parent 3686b95 commit bd6e107
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
5 changes: 2 additions & 3 deletions build/compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ function(__MZ_COMPILER_IS_CLANG _OUTPUT _OUTPUT_VERSION)
endif()

string(
REGEX REPLACE "(.*) version ([0-9])\\.([0-9])(\\.[0-9])?(\\-[0-9])?(~mlba)? \(.+\)" "\\2\\3"
REGEX MATCH "[0-9]\\.[0-9](\\.[0-9])?(\\-[0-9])?"
_MZ_CLANG_VERSION ${_MZ_CLANG_VERSION}
)

Expand Down Expand Up @@ -358,7 +358,7 @@ endif() #MZ_COMPILER_TEST_HAS_RUN

# determine current date and time
if(WINDOWS)
execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE MZ_DATE_STRING)
execute_process(COMMAND "date" "/T" OUTPUT_VARIABLE MZ_DATE_STRING)
set(MZ_USER_STRING $ENV{USERNAME})
else() # Sun, 11 Dec 2011 12:07:00 +0200
execute_process(COMMAND "date" "+%a, %d %b %Y %T %z" OUTPUT_VARIABLE MZ_DATE_STRING)
Expand All @@ -380,7 +380,6 @@ if( (NOT MZ_IS_CLANG) AND MZ_COMPILER_VERSION STRGREATER "47")
endif()

# compiler flags
mz_add_definition(${CMAKE_SYSTEM_PROCESSOR}=1)
mz_add_flag(GCC -Wall -Werror -Wno-unused-function)
if(WINDOWS)
mz_add_definition(WIN32=1 WINDOWS=1)
Expand Down
11 changes: 8 additions & 3 deletions build/generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ cat <<EOF
$0
==============================================
This file generates a Project Configuration for
building the configured Project at a default directory
(c) 2009-2013 Marius Zwicker
This file generates a project configuration for configuring
cmake using a predefined directory naming scheme
(c) 2009-2014 Marius Zwicker
Valid arguments:
'help' show this list
Expand All @@ -47,6 +47,7 @@ Can also be selected using environment variables:
MZ_CMAKETOOLS_generator=..
MZ_CMAKETOOLS_cmake=..
MZ_CMAKETOOLS_name=..
EOF
}

Expand Down Expand Up @@ -211,6 +212,10 @@ do
cmake)
my_cmake=${value}
;;
help)
help
exit 0
;;
*)
echo "-- WARNING: Unknown flag ${type}, skipping"
;;
Expand Down

0 comments on commit bd6e107

Please sign in to comment.