physx-sys 0.7.0

Unsafe bindings for NVIDIA PhysX C++ SDK
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# A simple wrapper around configure_file to try to make it multi-thread safe with a file lock.
FUNCTION(Configure_File_MT IN_TEMPLATE OUTPUT_FILENAME)

	FILE(LOCK ${OUTPUT_FILENAME}.lock
		GUARD FUNCTION 
		RESULT_VARIABLE LOCK_RESULT 
		TIMEOUT 30)

	IF (NOT LOCK_RESULT EQUAL 0)
		MESSAGE(WARNING "Failed to lock file ${OUTPUT_FILENAME} for output ERROR: ${LOCK_RESULT}")
		return()
	ENDIF()

	CONFIGURE_FILE("${IN_TEMPLATE}" "${OUTPUT_FILENAME}" @ONLY)

	FILE(LOCK ${OUTPUT_FILENAME}.lock RELEASE)

ENDFUNCTION()