diff --git a/src/fsgui3d/src/CMakeLists.txt b/src/fsgui3d/src/CMakeLists.txt index f6018ec..de695c1 100644 --- a/src/fsgui3d/src/CMakeLists.txt +++ b/src/fsgui3d/src/CMakeLists.txt @@ -36,12 +36,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsgui3d/src/gl1/CMakeLists.txt b/src/fsgui3d/src/gl1/CMakeLists.txt index cfa0c0a..4300fef 100644 --- a/src/fsgui3d/src/gl1/CMakeLists.txt +++ b/src/fsgui3d/src/gl1/CMakeLists.txt @@ -50,12 +50,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsgui3d/src/gl2/CMakeLists.txt b/src/fsgui3d/src/gl2/CMakeLists.txt index a38df18..bc86aa6 100644 --- a/src/fsgui3d/src/gl2/CMakeLists.txt +++ b/src/fsgui3d/src/gl2/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsgui3d/template-easy/CMakeLists.txt b/src/fsgui3d/template-easy/CMakeLists.txt index d20cef1..c565544 100644 --- a/src/fsgui3d/template-easy/CMakeLists.txt +++ b/src/fsgui3d/template-easy/CMakeLists.txt @@ -36,12 +36,8 @@ set(REALLY_NEED_CPP11 0) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsgui3d/template/CMakeLists.txt b/src/fsgui3d/template/CMakeLists.txt index e743cf7..22f7829 100644 --- a/src/fsgui3d/template/CMakeLists.txt +++ b/src/fsgui3d/template/CMakeLists.txt @@ -41,12 +41,8 @@ endif() # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsgui3d/template_with_filedialog/CMakeLists.txt b/src/fsgui3d/template_with_filedialog/CMakeLists.txt index 494598b..2fb3fa6 100644 --- a/src/fsgui3d/template_with_filedialog/CMakeLists.txt +++ b/src/fsgui3d/template_with_filedialog/CMakeLists.txt @@ -37,12 +37,8 @@ set(REALLY_NEED_CPP11 0) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsguilib/filedialog/CMakeLists.txt b/src/fsguilib/filedialog/CMakeLists.txt index d06e3b3..19f6c81 100644 --- a/src/fsguilib/filedialog/CMakeLists.txt +++ b/src/fsguilib/filedialog/CMakeLists.txt @@ -37,12 +37,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsguilib/src/CMakeLists.txt b/src/fsguilib/src/CMakeLists.txt index f7f1079..95824fa 100644 --- a/src/fsguilib/src/CMakeLists.txt +++ b/src/fsguilib/src/CMakeLists.txt @@ -36,12 +36,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsguilib/src/gl1/CMakeLists.txt b/src/fsguilib/src/gl1/CMakeLists.txt index 4aae48e..dc9b9f7 100644 --- a/src/fsguilib/src/gl1/CMakeLists.txt +++ b/src/fsguilib/src/gl1/CMakeLists.txt @@ -50,12 +50,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsguilib/src/gl2/CMakeLists.txt b/src/fsguilib/src/gl2/CMakeLists.txt index 254d1df..37cc00e 100644 --- a/src/fsguilib/src/gl2/CMakeLists.txt +++ b/src/fsguilib/src/gl2/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsguilib/src/nownd/CMakeLists.txt b/src/fsguilib/src/nownd/CMakeLists.txt index 9554738..76035fc 100644 --- a/src/fsguilib/src/nownd/CMakeLists.txt +++ b/src/fsguilib/src/nownd/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsguilib/template/CMakeLists.txt b/src/fsguilib/template/CMakeLists.txt index ea2f436..818465c 100644 --- a/src/fsguilib/template/CMakeLists.txt +++ b/src/fsguilib/template/CMakeLists.txt @@ -41,12 +41,8 @@ endif() # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fsguilib/template_with_filedialog/CMakeLists.txt b/src/fsguilib/template_with_filedialog/CMakeLists.txt index 2407929..a47a210 100644 --- a/src/fsguilib/template_with_filedialog/CMakeLists.txt +++ b/src/fsguilib/template_with_filedialog/CMakeLists.txt @@ -37,12 +37,8 @@ set(REALLY_NEED_CPP11 0) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fslazywindow/samples/sample00-bouncingBall/CMakeLists.txt b/src/fslazywindow/samples/sample00-bouncingBall/CMakeLists.txt index 143f789..39b7064 100644 --- a/src/fslazywindow/samples/sample00-bouncingBall/CMakeLists.txt +++ b/src/fslazywindow/samples/sample00-bouncingBall/CMakeLists.txt @@ -53,12 +53,8 @@ endif() # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fslazywindow/src/CMakeLists.txt b/src/fslazywindow/src/CMakeLists.txt index 023399a..88ab437 100644 --- a/src/fslazywindow/src/CMakeLists.txt +++ b/src/fslazywindow/src/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fslazywindow/template/CMakeLists.txt b/src/fslazywindow/template/CMakeLists.txt index 4562c0a..7f7f3b1 100644 --- a/src/fslazywindow/template/CMakeLists.txt +++ b/src/fslazywindow/template/CMakeLists.txt @@ -52,12 +52,8 @@ endif() # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fssimplefiledialog/sample/CMakeLists.txt b/src/fssimplefiledialog/sample/CMakeLists.txt index 69d568f..622f9ef 100644 --- a/src/fssimplefiledialog/sample/CMakeLists.txt +++ b/src/fssimplefiledialog/sample/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/fssimplefiledialog/src/CMakeLists.txt b/src/fssimplefiledialog/src/CMakeLists.txt index c42672f..242ded1 100644 --- a/src/fssimplefiledialog/src/CMakeLists.txt +++ b/src/fssimplefiledialog/src/CMakeLists.txt @@ -66,12 +66,8 @@ set(DATA_FILE_LOCATION) # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/opencv/arucoMarkerDetection/CMakeLists.txt b/src/opencv/arucoMarkerDetection/CMakeLists.txt index c293605..cf678b0 100644 --- a/src/opencv/arucoMarkerDetection/CMakeLists.txt +++ b/src/opencv/arucoMarkerDetection/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/opencv/drawMarker/CMakeLists.txt b/src/opencv/drawMarker/CMakeLists.txt index 9668bd6..c054850 100644 --- a/src/opencv/drawMarker/CMakeLists.txt +++ b/src/opencv/drawMarker/CMakeLists.txt @@ -65,12 +65,8 @@ set(DATA_FILE_LOCATION) # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/opencv/videoCapture/CMakeLists.txt b/src/opencv/videoCapture/CMakeLists.txt index 7acd752..541fceb 100644 --- a/src/opencv/videoCapture/CMakeLists.txt +++ b/src/opencv/videoCapture/CMakeLists.txt @@ -52,12 +52,8 @@ endif() # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysclass/src/CMakeFiles b/src/ysclass/src/CMakeFiles deleted file mode 100644 index fa775f6..0000000 --- a/src/ysclass/src/CMakeFiles +++ /dev/null @@ -1,8 +0,0 @@ -This file prevents accidental in-source build from this directory. - -What's horrible about cmake is if I accidentally type cmake where CMakeLists.txt exists, cmake happily considers it as an in-source build, and contaminate the directory with the build-related files. There seems to be no way of preventing accidental massive file contamination. Just one mistake is enough. It's as bad as accidental "rm -r *", because a lot of "rm -r something" follows to de-contaminate the source directory. - -However, cmake needs to create a directory called CMakeFiles to set up build-related files. It stops after creating CMakeCache.txt. - -Probably, creating a directory called CMakeCache.txt is also as effective. - diff --git a/src/ysclass/src/CMakeLists.txt b/src/ysclass/src/CMakeLists.txt index cacfca4..09aba89 100644 --- a/src/ysclass/src/CMakeLists.txt +++ b/src/ysclass/src/CMakeLists.txt @@ -36,12 +36,8 @@ set(REALLY_NEED_CPP11 0) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysclass11/src/CMakeLists.txt b/src/ysclass11/src/CMakeLists.txt index 0bd4494..ae9db7a 100644 --- a/src/ysclass11/src/CMakeLists.txt +++ b/src/ysclass11/src/CMakeLists.txt @@ -36,12 +36,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysclass11/src/ysthreadpool.cpp b/src/ysclass11/src/ysthreadpool.cpp index 4f33a05..3add8ca 100644 --- a/src/ysclass11/src/ysthreadpool.cpp +++ b/src/ysclass11/src/ysthreadpool.cpp @@ -27,6 +27,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //////////////////////////////////////////////////////////// */ +#include #include "ysthreadpool.h" diff --git a/src/ysfontrenderer/src/CMakeLists.txt b/src/ysfontrenderer/src/CMakeLists.txt index 9c920cf..02e9edf 100644 --- a/src/ysfontrenderer/src/CMakeLists.txt +++ b/src/ysfontrenderer/src/CMakeLists.txt @@ -40,12 +40,8 @@ set(REALLY_NEED_CPP11 0) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/cmdlib/CMakeLists.txt b/src/ysgebl/src/cmdlib/CMakeLists.txt index 5d917e9..fe4d8e0 100644 --- a/src/ysgebl/src/cmdlib/CMakeLists.txt +++ b/src/ysgebl/src/cmdlib/CMakeLists.txt @@ -47,12 +47,8 @@ set(REALLY_NEED_CPP11 0) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/cmdmain/CMakeLists.txt b/src/ysgebl/src/cmdmain/CMakeLists.txt index 135145e..6104f4e 100644 --- a/src/ysgebl/src/cmdmain/CMakeLists.txt +++ b/src/ysgebl/src/cmdmain/CMakeLists.txt @@ -47,12 +47,8 @@ set(REALLY_NEED_CPP11 0) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/gui/CMakeFiles b/src/ysgebl/src/gui/CMakeFiles deleted file mode 100644 index fa775f6..0000000 --- a/src/ysgebl/src/gui/CMakeFiles +++ /dev/null @@ -1,8 +0,0 @@ -This file prevents accidental in-source build from this directory. - -What's horrible about cmake is if I accidentally type cmake where CMakeLists.txt exists, cmake happily considers it as an in-source build, and contaminate the directory with the build-related files. There seems to be no way of preventing accidental massive file contamination. Just one mistake is enough. It's as bad as accidental "rm -r *", because a lot of "rm -r something" follows to de-contaminate the source directory. - -However, cmake needs to create a directory called CMakeFiles to set up build-related files. It stops after creating CMakeCache.txt. - -Probably, creating a directory called CMakeCache.txt is also as effective. - diff --git a/src/ysgebl/src/gui/CMakeLists.txt b/src/ysgebl/src/gui/CMakeLists.txt index 70fae92..03ca224 100644 --- a/src/ysgebl/src/gui/CMakeLists.txt +++ b/src/ysgebl/src/gui/CMakeLists.txt @@ -37,12 +37,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/gui_foundation/CMakeLists.txt b/src/ysgebl/src/gui_foundation/CMakeLists.txt index 76fbfbf..5517e84 100644 --- a/src/ysgebl/src/gui_foundation/CMakeLists.txt +++ b/src/ysgebl/src/gui_foundation/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/kernel/CMakeFiles b/src/ysgebl/src/kernel/CMakeFiles deleted file mode 100644 index fa775f6..0000000 --- a/src/ysgebl/src/kernel/CMakeFiles +++ /dev/null @@ -1,8 +0,0 @@ -This file prevents accidental in-source build from this directory. - -What's horrible about cmake is if I accidentally type cmake where CMakeLists.txt exists, cmake happily considers it as an in-source build, and contaminate the directory with the build-related files. There seems to be no way of preventing accidental massive file contamination. Just one mistake is enough. It's as bad as accidental "rm -r *", because a lot of "rm -r something" follows to de-contaminate the source directory. - -However, cmake needs to create a directory called CMakeFiles to set up build-related files. It stops after creating CMakeCache.txt. - -Probably, creating a directory called CMakeCache.txt is also as effective. - diff --git a/src/ysgebl/src/kernel/CMakeLists.txt b/src/ysgebl/src/kernel/CMakeLists.txt index 54dcb4f..de0ab1d 100644 --- a/src/ysgebl/src/kernel/CMakeLists.txt +++ b/src/ysgebl/src/kernel/CMakeLists.txt @@ -37,12 +37,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/kernelutil/CMakeFiles b/src/ysgebl/src/kernelutil/CMakeFiles deleted file mode 100644 index fa775f6..0000000 --- a/src/ysgebl/src/kernelutil/CMakeFiles +++ /dev/null @@ -1,8 +0,0 @@ -This file prevents accidental in-source build from this directory. - -What's horrible about cmake is if I accidentally type cmake where CMakeLists.txt exists, cmake happily considers it as an in-source build, and contaminate the directory with the build-related files. There seems to be no way of preventing accidental massive file contamination. Just one mistake is enough. It's as bad as accidental "rm -r *", because a lot of "rm -r something" follows to de-contaminate the source directory. - -However, cmake needs to create a directory called CMakeFiles to set up build-related files. It stops after creating CMakeCache.txt. - -Probably, creating a directory called CMakeCache.txt is also as effective. - diff --git a/src/ysgebl/src/kernelutil/CMakeLists.txt b/src/ysgebl/src/kernelutil/CMakeLists.txt index 01d9a1d..2df4cb6 100644 --- a/src/ysgebl/src/kernelutil/CMakeLists.txt +++ b/src/ysgebl/src/kernelutil/CMakeLists.txt @@ -37,12 +37,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/main/CMakeFiles b/src/ysgebl/src/main/CMakeFiles deleted file mode 100644 index fa775f6..0000000 --- a/src/ysgebl/src/main/CMakeFiles +++ /dev/null @@ -1,8 +0,0 @@ -This file prevents accidental in-source build from this directory. - -What's horrible about cmake is if I accidentally type cmake where CMakeLists.txt exists, cmake happily considers it as an in-source build, and contaminate the directory with the build-related files. There seems to be no way of preventing accidental massive file contamination. Just one mistake is enough. It's as bad as accidental "rm -r *", because a lot of "rm -r something" follows to de-contaminate the source directory. - -However, cmake needs to create a directory called CMakeFiles to set up build-related files. It stops after creating CMakeCache.txt. - -Probably, creating a directory called CMakeCache.txt is also as effective. - diff --git a/src/ysgebl/src/main/CMakeLists.txt b/src/ysgebl/src/main/CMakeLists.txt index e6be764..2e26fd3 100644 --- a/src/ysgebl/src/main/CMakeLists.txt +++ b/src/ysgebl/src/main/CMakeLists.txt @@ -73,12 +73,8 @@ endif() # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/samples/YsShellExt/CMakeLists.txt b/src/ysgebl/src/samples/YsShellExt/CMakeLists.txt index bd0a68b..43ce513 100644 --- a/src/ysgebl/src/samples/YsShellExt/CMakeLists.txt +++ b/src/ysgebl/src/samples/YsShellExt/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/shellrender/CMakeLists.txt b/src/ysgebl/src/shellrender/CMakeLists.txt index d440a25..4d4476d 100644 --- a/src/ysgebl/src/shellrender/CMakeLists.txt +++ b/src/ysgebl/src/shellrender/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/shellrender/gl1/CMakeLists.txt b/src/ysgebl/src/shellrender/gl1/CMakeLists.txt index e62726b..5221cd0 100644 --- a/src/ysgebl/src/shellrender/gl1/CMakeLists.txt +++ b/src/ysgebl/src/shellrender/gl1/CMakeLists.txt @@ -50,12 +50,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/shellrender/gl2/CMakeLists.txt b/src/ysgebl/src/shellrender/gl2/CMakeLists.txt index 22a132f..b709384 100644 --- a/src/ysgebl/src/shellrender/gl2/CMakeLists.txt +++ b/src/ysgebl/src/shellrender/gl2/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgebl/src/shellrender/nownd/CMakeLists.txt b/src/ysgebl/src/shellrender/nownd/CMakeLists.txt index 601df40..2b9c5af 100644 --- a/src/ysgebl/src/shellrender/nownd/CMakeLists.txt +++ b/src/ysgebl/src/shellrender/nownd/CMakeLists.txt @@ -50,12 +50,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysgl/src/CMakeLists.txt b/src/ysgl/src/CMakeLists.txt index a40cd07..e1632ce 100644 --- a/src/ysgl/src/CMakeLists.txt +++ b/src/ysgl/src/CMakeLists.txt @@ -54,12 +54,8 @@ endif() # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysglcpp/src/CMakeLists.txt b/src/ysglcpp/src/CMakeLists.txt index 63944ce..4aeb6bf 100644 --- a/src/ysglcpp/src/CMakeLists.txt +++ b/src/ysglcpp/src/CMakeLists.txt @@ -36,12 +36,8 @@ set(REALLY_NEED_CPP11 0) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysglcpp/src/gl1/CMakeLists.txt b/src/ysglcpp/src/gl1/CMakeLists.txt index 638f4e7..817023a 100644 --- a/src/ysglcpp/src/gl1/CMakeLists.txt +++ b/src/ysglcpp/src/gl1/CMakeLists.txt @@ -50,12 +50,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysglcpp/src/gl2/CMakeLists.txt b/src/ysglcpp/src/gl2/CMakeLists.txt index 64f823e..d8df9d0 100644 --- a/src/ysglcpp/src/gl2/CMakeLists.txt +++ b/src/ysglcpp/src/gl2/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysglcpp/src/nownd/CMakeLists.txt b/src/ysglcpp/src/nownd/CMakeLists.txt index 6ea2b1d..558e065 100644 --- a/src/ysglcpp/src/nownd/CMakeLists.txt +++ b/src/ysglcpp/src/nownd/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ysport/src/CMakeFiles b/src/ysport/src/CMakeFiles deleted file mode 100644 index fa775f6..0000000 --- a/src/ysport/src/CMakeFiles +++ /dev/null @@ -1,8 +0,0 @@ -This file prevents accidental in-source build from this directory. - -What's horrible about cmake is if I accidentally type cmake where CMakeLists.txt exists, cmake happily considers it as an in-source build, and contaminate the directory with the build-related files. There seems to be no way of preventing accidental massive file contamination. Just one mistake is enough. It's as bad as accidental "rm -r *", because a lot of "rm -r something" follows to de-contaminate the source directory. - -However, cmake needs to create a directory called CMakeFiles to set up build-related files. It stops after creating CMakeCache.txt. - -Probably, creating a directory called CMakeCache.txt is also as effective. - diff --git a/src/ysport/src/CMakeLists.txt b/src/ysport/src/CMakeLists.txt index 4806fc9..4628da1 100644 --- a/src/ysport/src/CMakeLists.txt +++ b/src/ysport/src/CMakeLists.txt @@ -46,12 +46,8 @@ endif() # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ystexturemanager/src/CMakeLists.txt b/src/ystexturemanager/src/CMakeLists.txt index 31b6964..1c90814 100644 --- a/src/ystexturemanager/src/CMakeLists.txt +++ b/src/ystexturemanager/src/CMakeLists.txt @@ -37,12 +37,8 @@ set(REALLY_NEED_CPP11 0) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ystexturemanager/src/gl/CMakeLists.txt b/src/ystexturemanager/src/gl/CMakeLists.txt index 2c4c179..f800ed1 100644 --- a/src/ystexturemanager/src/gl/CMakeLists.txt +++ b/src/ystexturemanager/src/gl/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM) diff --git a/src/ystexturemanager/src/null/CMakeLists.txt b/src/ystexturemanager/src/null/CMakeLists.txt index 8b63954..7b92d3f 100644 --- a/src/ystexturemanager/src/null/CMakeLists.txt +++ b/src/ystexturemanager/src/null/CMakeLists.txt @@ -48,12 +48,8 @@ set(REALLY_NEED_CPP11 1) # Setting 1 will enable use of C++11 libraries, but # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cmake_minimum_required(VERSION 3.0.0) -if("${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}" AND - "${CMAKE_BINARY_DIR}" MATCHES "^${CMAKE_SOURCE_DIR}") - message(FATAL_ERROR "In-source build prohibited.\nClear cache and Start cmake from somewhere else.") - # First condition is to allow inclusion of the project from outside CMake project with - # explicit binary-directory specification. eg. add_subdirectory from Android CMakeLists.txt -endif() + + if(MSVC) if(NOT WIN_SUBSYSTEM)