summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--definitionsconsistencycheck.cmake6
-rw-r--r--src/mscorlib/System.Private.CoreLib.csproj3
-rw-r--r--src/scripts/check-definitions.py7
3 files changed, 11 insertions, 5 deletions
diff --git a/definitionsconsistencycheck.cmake b/definitionsconsistencycheck.cmake
index cc029bb..51a70f7 100644
--- a/definitionsconsistencycheck.cmake
+++ b/definitionsconsistencycheck.cmake
@@ -1,11 +1,11 @@
get_directory_property( DirDefs COMPILE_DEFINITIONS )
# Reset the definition file
-file(WRITE cmake.definitions "")
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/cmake.definitions "")
foreach( d ${DirDefs} )
if($ENV{VERBOSE})
message( STATUS "Compiler Definition: " ${d} )
endif($ENV{VERBOSE})
- file(APPEND cmake.definitions ${d})
- file(APPEND cmake.definitions "\n")
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/cmake.definitions ${d})
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/cmake.definitions "\n")
endforeach()
diff --git a/src/mscorlib/System.Private.CoreLib.csproj b/src/mscorlib/System.Private.CoreLib.csproj
index 02719e3..6285e4a 100644
--- a/src/mscorlib/System.Private.CoreLib.csproj
+++ b/src/mscorlib/System.Private.CoreLib.csproj
@@ -183,8 +183,9 @@
<Message Importance="High" Text="============" />
<PropertyGroup>
<IgnoreDefineConstants>FEATURE_IMPLICIT_TLS;FEATURE_HIJACK</IgnoreDefineConstants>
+ <CMakeDefinitionSaveFile>$(IntermediateOutputPath)\cmake.definitions</CMakeDefinitionSaveFile>
</PropertyGroup>
- <Exec Command='python $(MSBuildThisFileDirectory)../scripts/check-definitions.py $(MSBuildThisFileDirectory)../../cmake.definitions "$(DefineConstants)" "$(IgnoreDefineConstants)" ' />
+ <Exec Command='python $(MSBuildThisFileDirectory)..\scripts\check-definitions.py "$(CMakeDefinitionSaveFile)" "$(DefineConstants)" "$(IgnoreDefineConstants)" ' />
<Message Importance="High" Text="============" />
</Target>
diff --git a/src/scripts/check-definitions.py b/src/scripts/check-definitions.py
index ace7078..59b309a 100644
--- a/src/scripts/check-definitions.py
+++ b/src/scripts/check-definitions.py
@@ -33,7 +33,12 @@ debug = 0
# For the native part, return the sorted definition array.
def loadDefinitionFile(filename):
result = []
- f = open(filename, 'r')
+ try:
+ f = open(filename, 'r')
+ except:
+ sys.exit(0)
+ # if cmake was not used (because of skipnative or systems that do not use cmake), this script won't work.
+
for line in f:
theLine = line.rstrip("\r\n").strip()
if (len(theLine) > 0):