Skip to content

Commit

Permalink
compile flag optionality
Browse files Browse the repository at this point in the history
  • Loading branch information
I-I committed Mar 18, 2012
1 parent 5e4e04f commit 824923c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Binary file added factorStack
Binary file not shown.
Empty file added git-daemon-export-ok
Empty file.
15 changes: 14 additions & 1 deletion vm/CMakeLists.txt
Expand Up @@ -9,10 +9,23 @@ CMake_Minimum_Required ( VERSION 2.8 )
Project ( FactorLanguage )
Set ( FactorLanguage_VERSION_MAJOR 0 )
Set ( FactorLanguage_VERSION_MINOR 0 )
#Add_Definitions ( -pipe -fPIC -Wl,--export-dynamic -Wl,--no-as-needed )

Set ( FactorBinaryName "factorStack" CACHE STRING "Name of the executable containing the entry point." )

# For adding optional parameters
Include(CheckCXXCompilerFlag)
Function(AddSupportedCXX)
ForEach( P IN LISTS ARGV )
Check_CXX_Compiler_Flag ( ${P} Supported )
If ( Supported )
Add_Definitions( ${P} )
EndIf()
Unset ( Supported CACHE )
EndForEach()
EndFunction(AddSupportedCXX)

AddSupportedCXX ( -pipe -fPIC -Wl,--export-dynamic -Wl,--no-as-needed )

Include(CheckTypeSize)
Check_Type_Size("int" WordToYourMotherboard BUILTIN_TYPES_ONLY)
If ( WordToYourMotherboard EQUAL 4 )
Expand Down

0 comments on commit 824923c

Please sign in to comment.