]> git.lyx.org Git - features.git/commitdiff
Fix EOLs
authorVincent van Ravesteijn <vfr@lyx.org>
Mon, 10 Mar 2014 19:33:40 +0000 (20:33 +0100)
committerVincent van Ravesteijn <vfr@lyx.org>
Mon, 10 Mar 2014 20:04:25 +0000 (21:04 +0100)
development/cmake/modules/FindCXX11Compiler.cmake

index e43e449985b989d729eedbc8e4c63d4c2996e27d..7a2d297bc8c2d2b8e9a446b2bc21155f19ad9df4 100644 (file)
@@ -1,95 +1,95 @@
-# This file is part of lyx.\r
-#\r
-# The module comes from the enblend project, slightly modified.\r
-#\r
-# Check if compiler supports C++11 features \r
-# and which compiler switches are necessary\r
-# CXX11_FLAG : contains the necessary compiler flag\r
-\r
-#\r
-# Copyright (c) 2013 Thomas Modes <tmodes@@users.sourceforge.net>\r
-#\r
-#  Redistribution and use in source and binary forms, with or without\r
-#  modification, are permitted provided that the following conditions\r
-#  are met:\r
-#\r
-#  1. Redistributions of source code must retain the copyright\r
-#         notice, this list of conditions and the following disclaimer.\r
-#  2. Redistributions in binary form must reproduce the copyright\r
-#         notice, this list of conditions and the following disclaimer in the\r
-#         documentation and/or other materials provided with the distribution.\r
-#  3. The name of the author may not be used to endorse or promote products\r
-#         derived from this software without specific prior written permission.\r
-#\r
-# This file is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-# GNU General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU General Public License\r
-# along with lyx; if not, write to the Free Software\r
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-#\r
-\r
-INCLUDE(CheckCXXSourceCompiles)\r
-INCLUDE(FindPackageHandleStandardArgs)\r
-\r
-if (CMAKE_CXX_COMPILER MATCHES "clang")\r
-  set(CXX11_FLAG_CANDIDATES "--std=c++11")\r
-else()\r
-  set(CXX11_FLAG_CANDIDATES\r
-    "--std=gnu++11"\r
-    "--std=c++11"\r
-    "--std=gnu++0x"\r
-  )\r
-endif()\r
-\r
-# sample openmp source code to test\r
-SET(CXX11_TEST_SOURCE \r
-"\r
-template <typename T>\r
-struct check\r
-{\r
-    static_assert(sizeof(int) <= sizeof(T), \"not big enough\");\r
-};\r
-\r
-typedef check<check<bool>> right_angle_brackets;\r
-\r
-class TestDeleted\r
-{\r
-public:\r
-    TestDeleted() = delete;\r
-};\r
-\r
-\r
-int a;\r
-decltype(a) b;\r
-\r
-typedef check<int> check_type;\r
-check_type c;\r
-check_type&& cr = static_cast<check_type&&>(c);\r
-\r
-auto d = a;\r
-\r
-int main() {\r
-  return 0;\r
-};\r
-")\r
-\r
-# check c compiler\r
-FOREACH(FLAG ${CXX11_FLAG_CANDIDATES})\r
-  SET(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")\r
-  SET(CMAKE_REQUIRED_FLAGS "${FLAG}")\r
-  UNSET(CXX11_FLAG_DETECTED CACHE)\r
-  CHECK_CXX_SOURCE_COMPILES("${CXX11_TEST_SOURCE}" CXX11_FLAG_DETECTED)\r
-  SET(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")\r
-  IF(CXX11_FLAG_DETECTED)\r
-    SET(CXX11_FLAG "${FLAG}")\r
-    BREAK()\r
-  ENDIF()\r
-ENDFOREACH()\r
-\r
-# handle the standard arguments for find_package\r
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CXX11Compiler DEFAULT_MSG CXX11_FLAG)\r
-\r
-MARK_AS_ADVANCED(CXX11_FLAG)\r
+# This file is part of lyx.
+#
+# The module comes from the enblend project, slightly modified.
+#
+# Check if compiler supports C++11 features 
+# and which compiler switches are necessary
+# CXX11_FLAG : contains the necessary compiler flag
+
+#
+# Copyright (c) 2013 Thomas Modes <tmodes@@users.sourceforge.net>
+#
+#  Redistribution and use in source and binary forms, with or without
+#  modification, are permitted provided that the following conditions
+#  are met:
+#
+#  1. Redistributions of source code must retain the copyright
+#         notice, this list of conditions and the following disclaimer.
+#  2. Redistributions in binary form must reproduce the copyright
+#         notice, this list of conditions and the following disclaimer in the
+#         documentation and/or other materials provided with the distribution.
+#  3. The name of the author may not be used to endorse or promote products
+#         derived from this software without specific prior written permission.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with lyx; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+
+INCLUDE(CheckCXXSourceCompiles)
+INCLUDE(FindPackageHandleStandardArgs)
+
+if (CMAKE_CXX_COMPILER MATCHES "clang")
+  set(CXX11_FLAG_CANDIDATES "--std=c++11")
+else()
+  set(CXX11_FLAG_CANDIDATES
+    "--std=gnu++11"
+    "--std=c++11"
+    "--std=gnu++0x"
+  )
+endif()
+
+# sample openmp source code to test
+SET(CXX11_TEST_SOURCE 
+"
+template <typename T>
+struct check
+{
+    static_assert(sizeof(int) <= sizeof(T), \"not big enough\");
+};
+
+typedef check<check<bool>> right_angle_brackets;
+
+class TestDeleted
+{
+public:
+    TestDeleted() = delete;
+};
+
+
+int a;
+decltype(a) b;
+
+typedef check<int> check_type;
+check_type c;
+check_type&& cr = static_cast<check_type&&>(c);
+
+auto d = a;
+
+int main() {
+  return 0;
+};
+")
+
+# check c compiler
+FOREACH(FLAG ${CXX11_FLAG_CANDIDATES})
+  SET(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
+  SET(CMAKE_REQUIRED_FLAGS "${FLAG}")
+  UNSET(CXX11_FLAG_DETECTED CACHE)
+  CHECK_CXX_SOURCE_COMPILES("${CXX11_TEST_SOURCE}" CXX11_FLAG_DETECTED)
+  SET(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
+  IF(CXX11_FLAG_DETECTED)
+    SET(CXX11_FLAG "${FLAG}")
+    BREAK()
+  ENDIF()
+ENDFOREACH()
+
+# handle the standard arguments for find_package
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CXX11Compiler DEFAULT_MSG CXX11_FLAG)
+
+MARK_AS_ADVANCED(CXX11_FLAG)